home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / InputSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-11  |  17.9 KB  |  741 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        InputSprocket.h
  3.  
  4.      Contains:    Public interfaces for InputSprocket
  5.  
  6.      Version:    Technology:    Apple Game Sprockets 1.0
  7.                  Package:    Universal Interfaces 2.1.4
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17. */
  18.  
  19.  
  20. #ifndef __INPUTSPROCKET__
  21. #define __INPUTSPROCKET__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __EVENTS__
  30. #include <Events.h>
  31. #endif
  32.  
  33.  
  34. #if GENERATINGPOWERPC
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_ALIGN_SUPPORTED
  41. #pragma options align=power
  42. #endif
  43.  
  44. /****** YOU NEED THESE LINES IF YOU DON'T HAVE THE LATEST TYPES.h
  45.  
  46. struct UnsignedWide {
  47.     UInt32                            hi;
  48.     UInt32                            lo;
  49. };
  50.  
  51. typedef UnsignedWide AbsoluteTime;
  52.  
  53. */
  54.  
  55. /* ********************* data types ********************* */
  56. typedef struct ISpDevicePrivate *ISpDeviceReference;
  57. typedef struct ISpElementPrivate *ISpElementReference;
  58. typedef struct ISpElementListPrivate *ISpElementListReference;
  59. typedef OSType ISpDeviceClass;  /* general classs of device, example : keyboard, mouse, joystick */
  60. typedef OSType ISpDeviceIdentifier;   /* a specific device,  example: standard 1-button mouse, 105key ext. kbd. */
  61. typedef OSType ISpElementLabel;
  62. typedef OSType ISpElementKind;
  63.  
  64. /* *************** errors -30420 to -30439***************** */
  65.  
  66. enum
  67. {
  68.     kISpInternalErr = -30420,
  69.     kISpSystemListErr = -30421,
  70.     kISpBufferToSmallErr = -30422,
  71.     kISpElementInListErr = -30423,
  72.     kISpElementNotInListErr = - 30424,
  73.     kISpSystemInactiveErr = -30425,
  74.     kISpDeviceInactiveErr = -30426,
  75.     kISpSystemActiveErr = -30427,
  76.     kISpDeviceActiveErr = -30428,
  77.     kISpListBusyErr = -30429
  78. };
  79.  
  80. /* *************** resources **************** */
  81.  
  82. enum 
  83. {
  84.     kISpSetListResourceType = 'setl',
  85.     kISpSetDataResourceType = 'setd'
  86. };
  87.  
  88. /*
  89.  * ISpDeviceDefinition
  90.  *
  91.  * This structure provides all the available
  92.  * information for an input device within the system
  93.  *
  94.  */
  95.  
  96. typedef struct ISpDeviceDefinition
  97. {
  98.     Str63 deviceName;                /* a human readable name of the device */
  99.     ISpDeviceClass theDeviceClass;        /* general classs of device example : keyboard, mouse, joystick */
  100.     ISpDeviceIdentifier theDeviceIdentifier;        /* every distinguishable device should have an OSType */
  101.     UInt32 permanentID;            /* a cross reboot id unique within that deviceType, 0 if not possible */
  102.     UInt32 flags;                /* some status flags */
  103.     UInt32 reserved1;
  104.     UInt32 reserved2;
  105.     UInt32 reserved3;
  106. } ISpDeviceDefinition;
  107.  
  108. enum
  109. {
  110.     kISpDeviceFlag_HandleOwnEmulation = 1
  111. };
  112.  
  113. /*
  114.  * ISpElementEvent, ISpElementEventPtr
  115.  *
  116.  * This is the structure that event data is passed in.
  117.  *
  118.  */
  119.  
  120. typedef struct ISpElementEvent
  121. {
  122.     AbsoluteTime when;                  /* this is absolute time on PCI or later, otherwise it is */
  123.                                         /* 0 for the hi 32 bits and TickCount for the low 32 bits */
  124.     ISpElementReference element;        /* a reference to the element that generated this event */
  125.     UInt32 refCon;                        /* for application usage, 0 on the global list */
  126.     UInt32 data;                        /* the data for this event */
  127. } ISpElementEvent, *ISpElementEventPtr;
  128.  
  129. /*
  130.  * ISpElementInfo, ISpElementInfoPtr
  131.  *
  132.  * This is the generic definition of an element.
  133.  * Every element must contain this information.
  134.  *
  135.  */
  136. typedef struct ISpElementInfo
  137. {
  138.     ISpElementLabel theLabel;
  139.     ISpElementKind theKind;
  140.     Str63 theString;
  141.     UInt32 reserved1;
  142.     UInt32 reserved2;
  143. } ISpElementInfo, *ISpElementInfoPtr;
  144.  
  145. typedef struct ISpNeed
  146. {
  147.     Str63 name;
  148.     short iconSuiteResourceId;    /* resource id of the icon suite */
  149.     short reserved;
  150.     ISpElementKind theKind;
  151.     ISpElementLabel theLabel;
  152.     UInt32 flags;
  153.     UInt32 reserved1;
  154.     UInt32 reserved2;
  155.     UInt32 reserved3;
  156. } ISpNeed;
  157.  
  158. typedef UInt32 ISpNeedFlagBits;
  159. enum
  160. {
  161.     kISpNeedFlag_NoMultiConfig = 1
  162. };
  163.  
  164. /*
  165.  *
  166.  * These are the current built values for ISpDeviceClass
  167.  *
  168.  */
  169.  
  170. enum
  171. {
  172.     kISpDeviceClass_SpeechRecognition = 'talk',
  173.     kISpDeviceClass_Mouse = 'mous',
  174.     kISpDeviceClass_Keyboard = 'keyd',
  175.     kISpDeviceClass_Joystick = 'joys',
  176.     kISpDeviceClass_Wheel = 'whel',
  177.     kISpDeviceClass_Pedals = 'pedl',
  178.     kISpDeviceClass_Levers = 'levr'
  179. };
  180.  
  181. /*
  182.  * These are the current built in ISpElementKind's
  183.  * 
  184.  * These are all OSTypes.
  185.  *
  186.  */
  187.  
  188. enum
  189. {
  190.     kISpElementKind_Button = 'butn',
  191.     kISpElementKind_DPad = 'dpad',
  192.     kISpElementKind_Axis = 'axis',
  193.     kISpElementKind_Movement = 'move',
  194.     kISpElementKind_Virtual = 'virt'
  195. };
  196.  
  197.  
  198. /*
  199.  *
  200.  * These are the current built in ISpElementLabel's
  201.  *
  202.  * These are all OSTypes.
  203.  *
  204.  */
  205.  
  206. enum
  207. {
  208.     /* generic */
  209.     kISpElementLabel_None = 'none',
  210.     
  211.     /* axis */
  212.     kISpElementLabel_XAxis = 'xaxi',
  213.     kISpElementLabel_YAxis = 'yaxi',
  214.     kISpElementLabel_ZAxis = 'zaxi',
  215.     
  216.     kISpElementLabel_Rx = 'rxax',
  217.     kISpElementLabel_Ry = 'ryax',
  218.     kISpElementLabel_Rz = 'rzax',
  219.     
  220.     kISpElementLabel_Gas = 'gasp',
  221.     kISpElementLabel_Brake = 'brak',
  222.     kISpElementLabel_Clutch = 'cltc',
  223.     
  224.     kISpElementLabel_Throttle = 'thrt',
  225.     kISpElementLabel_Trim = 'trim',
  226.     
  227.     /* direction pad */
  228.     kISpElementLabel_POVHat = 'povh',
  229.     kISpElementLabel_PadMove = 'move',
  230.     
  231.     /* buttons */
  232.     kISpElementLabel_Fire = 'fire',
  233.     kISpElementLabel_Start = 'strt',
  234.     kISpElementLabel_Select = 'optn'
  235. };
  236.  
  237. /*
  238.  *
  239.  * direction pad data & configuration information
  240.  *
  241.  */
  242.  
  243. typedef UInt32 ISpDPadData;
  244. enum
  245. {
  246.     kISpPadIdle = 0,
  247.     kISpPadLeft,
  248.     kISpPadUpLeft,
  249.     kISpPadUp,
  250.     kISpPadUpRight,
  251.     kISpPadRight,
  252.     kISpPadDownRight,
  253.     kISpPadDown,
  254.     kISpPadDownLeft
  255. };
  256.  
  257. typedef struct ISpDPadConfigurationInfo
  258. {
  259.     UInt32 id;                /* ordering 1..n, 0 = no relavent ordering of direction pads */
  260.     Boolean fourWayPad;        /* true if this pad can only produce idle + four directions */
  261. } ISpDPadConfigurationInfo;
  262.  
  263. /*
  264.  *
  265.  * button data & configuration information
  266.  *
  267.  */
  268.  
  269. typedef UInt32 ISpButtonData;
  270. enum
  271. {
  272.     kISpButtonUp = 0,
  273.     kISpButtonDown = 1
  274. };
  275.  
  276. typedef struct ISpButtonConfigurationInfo
  277. {
  278.     UInt32 id;                /* ordering 1..n, 0 = no relavent ordering of buttons */
  279. } ISpButtonConfigurationInfo;
  280.  
  281. /*
  282.  *
  283.  * axis data & configuration information 
  284.  *
  285.  */
  286.  
  287. #define    kISpAxisMinimum  0x00000000U
  288. #define    kISpAxisMiddle   0x7FFFFFFFU
  289. #define    kISpAxisMaximum  0xFFFFFFFFU
  290.  
  291. typedef struct ISpAxisConfigurationInfo
  292. {
  293.     Boolean    symetricAxis;    /* axis is symetric, i.e. meaningful 0ish idle at the kISpAxisMiddle position */
  294. } ISpAxisConfigurationInfo;
  295.  
  296.  
  297. typedef struct ISpMovementData
  298. {
  299.     UInt32 xAxis;
  300.     UInt32 yAxis;
  301.     UInt32 direction;    /* ISpDPadData version of the movement */
  302. } ISpMovementData;
  303.  
  304. enum
  305. {
  306.     kISpVirtualElementFlag_UseTempMem = 1
  307. };
  308.  
  309. enum
  310. {
  311.     kISpElementListFlag_UseTempMem = 1
  312. };
  313.  
  314. enum
  315. {
  316.     kISpFirstIconSuite = 30000,
  317.     kISpLastIconSuite = 30100,
  318.     kISpNoneIconSuite = 30000
  319. };
  320.  
  321. /* ********************* user level functions ********************* */
  322.  
  323. /********** user interface functions **********/
  324.  
  325.  
  326. NumVersion ISpGetVersion(void);
  327.  
  328. /*
  329.  *
  330.  * ISpElement_NewVirtual(ISpElementReference *outElement);
  331.  *
  332.  */
  333.  
  334. OSStatus ISpElement_NewVirtual(UInt32 dataSize, ISpElementReference *outElement, UInt32 flags);
  335.  
  336. /*
  337.  *
  338.  * ISpElement_NewVirtualFromNeeds(UInt32 count, ISpNeeds *needs, ISpElementReference *outElements);
  339.  *
  340.  */
  341.  
  342. OSStatus ISpElement_NewVirtualFromNeeds(UInt32 count, ISpNeed *needs, ISpElementReference *outElements, UInt32 flags);
  343.  
  344. /*
  345.  *
  346.  * ISpElement_DisposeVirtual(inElement);
  347.  *
  348.  */
  349.  
  350. OSStatus ISpElement_DisposeVirtual(UInt32 count, ISpElementReference *inElements);
  351.  
  352. /*
  353.  * ISpInit
  354.  *
  355.  */
  356.  
  357. OSStatus ISpInit(
  358.     UInt32 count,
  359.     ISpNeed *needs,
  360.     ISpElementReference *inReferences,
  361.     OSType appCreatorCode,
  362.     OSType subCreatorCode,
  363.     UInt32 flags,
  364.     short setListResourceId, 
  365.     UInt32 version);
  366.     
  367.     
  368. /*
  369.  * ISpConfigure
  370.  *
  371.  */
  372.  
  373. typedef Boolean (*ISpEventProcPtr) (EventRecord* inEvent);
  374.  
  375. OSStatus ISpConfigure(ISpEventProcPtr inEventProcPtr);
  376.  
  377. /*
  378.  *
  379.  * ISpStop
  380.  *
  381.  */
  382.  
  383. OSStatus ISpStop(void);
  384.  
  385. /*
  386.  *
  387.  * ISpSuspend, ISpResume
  388.  *
  389.  */
  390.  
  391. OSStatus ISpSuspend(void);
  392. OSStatus ISpResume(void);
  393.  
  394. /*
  395.  * DevicesExtract
  396.  *
  397.  * DevicesExract will extract as many of the devices from a system wide list as possible.  You pass
  398.  * ina pointer to an array of device references and the size of that array in units of sizeof(ISpDeviceReference)
  399.  * It will return how many device references are in the system wide list in the outCount parameter and 
  400.  * it will copy the minimum of that number and the size of the inBufferCount parameter (how big your array was).
  401.  *
  402.  * ByClass and ByIdentifier are the same except that they will only count and copy device references to devices
  403.  * of the specified class or identifier.
  404.  *
  405.  * Return Codes
  406.  * paramErr
  407.  *
  408.  */
  409.  
  410. OSStatus ISpDevices_Extract(UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  411. OSStatus ISpDevices_ExtractByClass(ISpDeviceClass theClass, UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  412. OSStatus ISpDevices_ExtractByIdentifier(ISpDeviceIdentifier theIdentifier, UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  413.  
  414.  
  415. /*
  416.  * DeactivateDevices, ActivateDevices
  417.  *
  418.  * All devices in the sytem start out activate but if for some reason you don't want to get events
  419.  * from some devices then you can use these class to turn on and off getting those events.  The 
  420.  * most likely case is if you would want to get input from the keyboard or mouse as cursor/text style
  421.  * data.
  422.  *
  423.  * Return Codes
  424.  * paramErr
  425.  *
  426.  */
  427.  
  428. OSStatus ISpDevices_Activate(UInt32 inDeviceCount, ISpDeviceReference *inDevicesToActivate);
  429. OSStatus ISpDevices_Deactivate(UInt32 inDeviceCount, ISpDeviceReference *inDevicesToDeactivate);
  430. OSStatus ISpDevice_IsActive(ISpDeviceReference inDevice, Boolean *outIsActive);
  431.  
  432. /*
  433.  * ISpDevice_GetDefinition
  434.  *
  435.  * pass in the device reference, sizeof(ISpDeviceDefinition) and this will 
  436.  * return the device definition struct for that device into the buffer pointed to 
  437.  * by outStruct
  438.  *
  439.  * Return Codes
  440.  * paramErr
  441.  *
  442.  */
  443.  
  444. OSStatus ISpDevice_GetDefinition(const ISpDeviceReference inDevice, UInt32 buflen, ISpDeviceDefinition *outStruct);
  445.  
  446.  
  447. /*
  448.  *
  449.  * ISpDevice_GetElementList
  450.  *
  451.  * pass in the device reference and this will return the element list for that device
  452.  * you are prohibited from modifiying this element list 
  453.  *
  454.  * Return Codes
  455.  * paramErr
  456.  *
  457.  */
  458.  
  459. OSStatus ISpDevice_GetElementList(const ISpDeviceReference inDevice, ISpElementListReference *outElementList);
  460.  
  461. /*
  462.  *
  463.  * takes an ISpElementReference and returns the group that it is in or 0 if there is
  464.  * no group
  465.  *
  466.  * Return Codes
  467.  * paramErr if inElement is 0
  468.  *
  469.  */
  470.  
  471. OSStatus ISpElement_GetGroup(const ISpElementReference inElement, UInt32 *outGroup);
  472.  
  473. /*
  474.  *
  475.  * takes an ISpElementReference and returns the device that the element belongs 
  476.  * to.
  477.  *
  478.  * Return Codes
  479.  * paramErr if inElement is 0 or outDevice is nil
  480.  *
  481.  */
  482.  
  483. OSStatus ISpElement_GetDevice(const ISpElementReference inElement, ISpDeviceReference *outDevice);
  484.         
  485. /*
  486.  *
  487.  * takes an ISpElementReference and gives the ISpElementInfo for that Element.  This is the
  488.  * the set of standard information.  You get ISpElementKind specific information
  489.  * through ISpElement_GetConfigurationInfo.
  490.  *
  491.  * Return Codes
  492.  * paramErr if inElement is 0 or outInfo is nil
  493.  *
  494.  */
  495.  
  496. OSStatus ISpElement_GetInfo(const ISpElementReference inElement, ISpElementInfoPtr outInfo);
  497.         
  498. /*
  499.  *
  500.  *         
  501.  *
  502.  * takes an ISpElementReference and gives the ISpElementKind specific configuration information
  503.  * 
  504.  * if buflen is not long enough to hold the information ISpElement_GetConfigurationInfo will
  505.  * copy buflen bytes of the data into the block of memory pointed to by configInfo and
  506.  * will return something error.
  507.  *
  508.  * Return Codes
  509.  * paramErr if inElement or configInfo is nil
  510.  * something error if buflen is not long enough to hold the information
  511.  *
  512.  */
  513.  
  514. OSStatus ISpElement_GetConfigurationInfo(const ISpElementReference inElement, UInt32 buflen, void *configInfo);
  515.     
  516. /*
  517.  *
  518.  * ISpElement_GetSimpleState
  519.  *
  520.  * Takes an ISpElementReference and returns the current state of that element.  This is a 
  521.  * specialized version of ISpElement_GetComplexState that is only appropriate for elements
  522.  * whose data fits in a signed 32 bit integer.
  523.  *
  524.  *
  525.  *
  526.  * Return Codes
  527.  * paramErr if inElement is 0 or state is nil
  528.  * err1 if the elements data does not fit in a signed 32 bit integer
  529.  *
  530.  */
  531.  
  532. OSStatus ISpElement_GetSimpleState(const ISpElementReference inElement, UInt32 *state);
  533.  
  534. /*
  535.  *
  536.  * ISpElement_GetComplexState
  537.  *
  538.  * Takes an ISpElementReference and returns the current state of that element.  
  539.  * Will copy up to buflen bytes of the current state of the device into
  540.  * state.
  541.  *
  542.  *
  543.  * Return Codes
  544.  * paramErr if inElement is 0 or state is nil
  545.  * err2 if buflen is not large enough to hold all the data
  546.  *
  547.  */
  548.  
  549. OSStatus ISpElement_GetComplexState(const ISpElementReference inElement, UInt32 buflen, void *state);
  550.  
  551.  
  552. /*
  553.  * ISpElement_GetNextEvent
  554.  *
  555.  * changed 3/14/96
  556.  *
  557.  * It takes in an element  reference and the buffer size of the ISpElementEventPtr
  558.  * it will set wasEvent to true if there was an event and false otherwise.  If there
  559.  * was not enough space to fill in the whole event structure that event will be
  560.  * dequed, as much of the event as will fit in the buffer will by copied and
  561.  * ISpElement_GetNextEvent will return an error.
  562.  *
  563.  * Return Codes
  564.  * paramErr
  565.  * somethingErr - buffer to small
  566.  */
  567.  
  568. OSStatus ISpElement_GetNextEvent(ISpElementReference inElement, UInt32 bufSize, ISpElementEventPtr event, Boolean *wasEvent);
  569.  
  570. /*
  571.  *
  572.  * ISpElement_Flush
  573.  *
  574.  * It takes an ISpElementReference and flushes all the events on that element.  All it guaruntees is
  575.  * that any events that made it to this layer before the time of the flush call will be flushed and
  576.  * it will not flush any events that make it to this layer after the time when the call has returned.
  577.  * What happens to events that occur during the flush is undefined.
  578.  *
  579.  *
  580.  * Return Codes
  581.  * paramErr
  582.  *
  583.  */
  584.  
  585. OSStatus ISpElement_Flush(ISpElementReference inElement);
  586.  
  587.  
  588.  
  589. /*
  590.  * ISpElementList_New
  591.  *
  592.  * Creates a new element list and returns it in outElementList.  In count specifies 
  593.  * the number of element references in the list pointed to by inElements.  If inCount
  594.  * is non zero the list is created with inCount elements in at as specified by the 
  595.  * inElements parameter.  Otherwise the list is created empty.
  596.  *
  597.  *
  598.  * Return Codes
  599.  * out of memory - If it failed to allocate the list because it was out of memory
  600.                    it will also set outElementList to 0
  601.  * paramErr if outElementList was nil
  602.  *
  603.  *
  604.  * Special Concerns
  605.  *
  606.  * interrupt unsafe
  607.  *
  608.  */
  609.  
  610. OSStatus ISpElementList_New(UInt32 inCount, ISpElementReference *inElements, ISpElementListReference *outElementList, UInt32 flags);
  611.  
  612. /*
  613.  * ISpElementList_Dispose
  614.  *
  615.  * Deletes an already existing memory list.  
  616.  *
  617.  *
  618.  * Return Codes
  619.  * paramErr if inElementList was 0
  620.  *
  621.  *
  622.  * Special Concerns
  623.  *
  624.  * interrupt unsafe
  625.  *
  626.  */
  627.  
  628. OSStatus ISpElementList_Dispose(ISpElementListReference inElementList);
  629.  
  630. /*
  631.  * ISpGetGlobalElementList
  632.  *
  633.  * returns the global element list
  634.  *
  635.  * Return Codes
  636.  * paramErr if outElementList is nil
  637.  *
  638.  */ 
  639.  
  640. OSStatus ISpGetGlobalElementList(ISpElementListReference *outElementList);
  641.  
  642. /*
  643.  * ISpElementList_AddElement
  644.  *
  645.  * adds an element to the element list
  646.  *
  647.  * Return Codes
  648.  * paramErr if inElementList is 0 or newElement is 0
  649.  * memory error if the system is unable to allocate enough memory
  650.  *
  651.  * Special Concerns
  652.  * interrupt Unsafe
  653.  * 
  654.  */
  655. OSStatus ISpElementList_AddElements(ISpElementListReference inElementList, UInt32 refCon, UInt32 count, ISpElementReference *newElements);
  656.  
  657. /*
  658.  * ISpElementList_RemoveElement
  659.  *
  660.  * removes the specified element from the element list
  661.  *
  662.  * Return Codes
  663.  * paramErr if inElementList is 0 or oldElement is 0
  664.  * memory error if the system is unable to allocate enough memory
  665.  *
  666.  * Special Concerns
  667.  * interrupt Unsafe
  668.  * 
  669.  */
  670.  
  671. OSStatus ISpElementList_RemoveElements(ISpElementListReference inElementList, UInt32 count, ISpElementReference *oldElement);
  672.  
  673. /*
  674.  * ISpElementList_Extract
  675.  *
  676.  * ISpElementList_Extract will extract as many of the elements from an element list as possible.  You pass
  677.  * in an element list, a pointer to an array of element references and the number of elements in that array.
  678.  * It will return how many items are in the element list in the outCount parameter and copy the minimum of 
  679.  * that number and the size of the array into the buffer.
  680.  *
  681.  * ByKind and ByLabel are the same except that they will only count and copy element references to elements
  682.  * that have the specified kind and label.
  683.  *
  684.  * Return Codes
  685.  * paramErr
  686.  *
  687.  */
  688.  
  689. OSStatus ISpElementList_Extract(ISpElementListReference inElementList, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  690. OSStatus ISpElementList_ExtractByKind(ISpElementListReference inElementList, ISpElementKind theKind, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  691. OSStatus ISpElementList_ExtractByLabel(ISpElementListReference inElementList, ISpElementLabel theLabel, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  692.  
  693. /*
  694.  * ISpElementList_GetNextEvent
  695.  *
  696.  * changed 3/14/96
  697.  *
  698.  * It takes in an element list reference and the buffer size of the ISpElementEventPtr
  699.  * it will set wasEvent to true if there was an event and false otherwise.  If there
  700.  * was not enough space to fill in the whole event structure that event will be
  701.  * dequed, as much of the event as will fit in the buffer will by copied and
  702.  * ISpElementList_GetNextEvent will return an error.
  703.  *
  704.  * Return Codes
  705.  * paramErr
  706.  * somethingErr - buffer to small
  707.  */
  708.  
  709. OSStatus ISpElementList_GetNextEvent(ISpElementListReference inElementList, UInt32 bufSize, ISpElementEventPtr event, Boolean *wasEvent);
  710.  
  711. /*
  712.  *
  713.  * ISpElementList_Flush
  714.  *
  715.  * It takes an ISpElementListReference and flushes all the events on that list.  All it guaruntees is
  716.  * that any events that made it to this layer before the time of the flush call will be flushed and
  717.  * it will not flush any events that make it to this layer after the time when the call has returned.
  718.  * What happens to events that occur during the flush is undefined.
  719.  *
  720.  *
  721.  * Return Codes
  722.  * paramErr
  723.  *
  724.  */
  725.  
  726. OSStatus ISpElementList_Flush(ISpElementListReference inElementList);
  727.  
  728.  
  729. #ifdef __cplusplus
  730. }
  731. #endif
  732.  
  733.  
  734.  
  735. #if PRAGMA_ALIGN_SUPPORTED
  736. #pragma options align=reset
  737. #endif
  738.  
  739. #endif /* GENERATINGPOWERPC */
  740. #endif /* __INPUTSPROCKET__ */
  741.